/**
 * 模型AVE
 */
export const vaeOptions = [
  { label: 'None', value: 'None' },
  { label: 'Automatic', value: 'Automatic' },
  { label: 'sdxl_vae.safetensors', value: 'sdxl_vae.safetensors' },
  { label: 'vae-ft-mse-840000-ema-pruned.safetensors', value: 'vae-ft-mse-840000-ema-pruned.safetensors' }
]

/**
 * 图片大小
 */
export const imageSizeOptions = [
  {
    label: '512x768',
    value: '512,768',
    name: 'Portrait',
    icon: 'icon-a-2_3'
  },
  {
    label: '768x512',
    value: '768,512',
    name: 'Landscape',
    icon: 'icon-a-3_2'
  },
  {
    label: '640x640',
    value: '640,640',
    name: 'Square',
    icon: 'icon-a-1_1'
  },
  {
    label: 'custom',
    value: '0',
    name: 'custom',
    icon: 'icon-aspect-ratio-line'
  }
]

/**
 * 图片大小 MJ模式
 */
export const imageSizePlusOptions = [
  {
    label: '1024x1024',
    value: '1024,1024',
    name: '1024x1024',
    icon: 'icon-a-1_11'
  },
  {
    label: '832x1216',
    value: '832,1216',
    name: '832x1216',
    icon: 'icon-a-2_31'
  },
  {
    label: '1216x832',
    value: '1216,832',
    name: '1216x832',
    icon: 'icon-a-3_21'
  },
  {
    label: '896x1152',
    value: '896,1152',
    name: '896x1152',
    icon: 'icon-a-3_4'
  },
  {
    label: '1152x896',
    value: '1152,896',
    name: '1152x896',
    icon: 'icon-a-4_3'
  },
  {
    label: '768x1344',
    value: '768,1344',
    name: '768x1344',
    icon: 'icon-a-9_16'
  },
  {
    label: '1344x768',
    value: '1344,768',
    name: '1344x768',
    icon: 'icon-a-16_9'
  }
]

/**
 * 采样器
 */
export const samplerOptions = [
  { label: 'DPM++ 2M', value: 'DPM++ 2M' },
  { label: 'DPM++ SDE', value: 'DPM++ SDE' },
  { label: 'DPM++ 2M SDE', value: 'DPM++ 2M SDE' },
  { label: 'DPM++ 2M SDE Heun', value: 'DPM++ 2M SDE Heun' },
  { label: 'DPM++ 2S a', value: 'DPM++ 2S a' },
  { label: 'DPM++ 3M SDE', value: 'DPM++ 3M SDE' },
  { label: 'Euler a', value: 'Euler a' },
  { label: 'Euler', value: 'Euler' },
  { label: 'LMS', value: 'LMS' },
  { label: 'Heun', value: 'Heun' },
  { label: 'DPM2', value: 'DPM2' },
  { label: 'DPM2 a', value: 'DPM2 a' },
  { label: 'DPM fast', value: 'DPM fast' },
  { label: 'DPM adaptive', value: 'DPM adaptive' },
  { label: 'Restart', value: 'Restart' },
  { label: 'DDIM', value: 'DDIM' },
  { label: 'DDIM CFG++', value: 'DDIM CFG++' },
  { label: 'PLMS', value: 'PLMS' },
  { label: 'UniPC', value: 'UniPC' },
  { label: 'LCM', value: 'LCM' }
]

/**
 * 调度类型
 */
export const schedulerOptions = [
  {
    label: 'Automatic',
    value: 'Automatic'
  },
  {
    label: 'Uniform',
    value: 'Uniform'
  },
  {
    label: 'Karras',
    value: 'Karras'
  },
  {
    label: 'Exponential',
    value: 'Exponential'
  },
  {
    label: 'Polyexponential',
    value: 'Polyexponential'
  },
  {
    label: 'SGM Uniform',
    value: 'SGM Uniform'
  },
  {
    label: 'KL Optimal',
    value: 'KL Optimal'
  },
  {
    label: 'Align Your Steps',
    value: 'Align Your Steps'
  },
  {
    label: 'Simple',
    value: 'Simple'
  },
  {
    label: 'Normal',
    value: 'Normal'
  },
  {
    label: 'DDIM',
    value: 'DDIM'
  },
  {
    label: 'Beta',
    value: 'Beta'
  }
]

/**
 * 放大算法
 */
export const upsampleOptions = [
  { label: 'Latent', value: 'Latent' },
  { label: 'Latent (antialiased)', value: 'Latent (antialiased)' },
  { label: 'Latent (bicubic)', value: 'Latent (bicubic)' },
  { label: 'Latent (bicubic antialiased)', value: 'Latent (bicubic antialiased)' },
  { label: 'Latent (nearest)', value: 'Latent (nearest)' },
  { label: 'Latent (nearest-exact)', value: 'Latent (nearest-exact)' },
  { label: 'None', value: 'None' },
  { label: 'Lanczos', value: 'Lanczos' },
  { label: 'Nearest', value: 'Nearest' },
  { label: 'DAT x2', value: 'DAT x2' },
  { label: 'DAT x3', value: 'DAT x3' },
  { label: 'DAT x4', value: 'DAT x4' },
  { label: 'ESRGAN_4x', value: 'ESRGAN_4x' },
  { label: 'LDSR', value: 'LDSR' },
  { label: 'R-ESRGAN 4x+', value: 'R-ESRGAN 4x+' },
  { label: 'R-ESRGAN 4x+ Anime6B', value: 'R-ESRGAN 4x+ Anime6B' },
  { label: 'ScuNET GAN', value: 'ScuNET GAN' },
  { label: 'ScuNET PSNR', value: 'ScuNET PSNR' },
  { label: 'SwinIR_4x', value: 'SwinIR_4x' }
]

/**
 * 动画模型
 */
export const animationOptions: { [key in string]: any[] } = {
  SDXL: [
    {
      label: 'mm_sdxl_hs.safetensors',
      value: 'mm_sdxl_hs.safetensors'
    },
    {
      label: 'mm_sdxl_v10_beta.safetensors',
      value: 'mm_sdxl_v10_beta.safetensors'
    }
  ],
  'SD1.5': [
    {
      label: 'mm_sd15_v2.safetensors',
      value: 'mm_sd15_v2.safetensors'
    },
    {
      label: 'mm_sd15_v3.safetensors',
      value: 'mm_sd15_v3.safetensors'
    }
  ]
}

/**
 * 缩放模式
 */
export const zoomModeOptions = [
  {
    label: '拉伸',
    value: 0
  },
  {
    label: '剪裁',
    value: 1
  },
  {
    label: '填充',
    value: 2
  },
  {
    label: '直接缩放（潜空间放大）',
    value: 3
  }
]

/**
 * 蒙版模式
 */
export const maskModeOptions = [
  {
    label: '绘制蒙版内容',
    value: 0
  },
  {
    label: '绘制非蒙版内容',
    value: 1
  }
]

/**
 * 蒙版蒙住的内容
 */
export const maskFillOptions = [
  {
    label: '填充',
    value: 0
  },
  {
    label: '原图',
    value: 1
  },
  {
    label: '潜在噪声',
    value: 2
  },
  {
    label: '无潜在空间',
    value: 3
  }
]

/**
 * 绘制区域
 */
export const drawRegionOptions = [
  {
    label: '全图',
    value: false
  },
  {
    label: '仅蒙版',
    value: true
  }
]

/**
 * 控制网络类型
 */
export const controlTypeOptions = [
  {
    label: 'Canny(线条)',
    value: 'Canny'
  },
  {
    label: 'OpenPose(骨骼)',
    value: 'OpenPose'
  },
  {
    label: 'Segmentation(语义分割)',
    value: 'Segmentation'
  },
  {
    label: 'Lineart(线稿)',
    value: 'Lineart'
  },
  {
    label: 'Depth(深度)',
    value: 'Depth'
  },
  {
    label: 'Instant-ID(换脸)',
    value: 'Instant-ID'
  },
  {
    label: 'SoftEdge(模糊边缘)',
    value: 'SoftEdge'
  },
  {
    label: 'QR code(二维码)',
    value: 'QR code'
  },
  {
    label: 'NormalMap(法线贴图)',
    value: 'NormalMap'
  },
  {
    label: 'IP-Adapter(元素替换)',
    value: 'IP-Adapter'
  }
]

/**
 * 控制模式
 */
export const controlModeOptions = [
  {
    label: '平衡模式/Balanced',
    value: 'Balanced'
  },
  {
    label: '以提示词为主/My prompt is more important',
    value: 'My prompt is more important'
  },
  {
    label: '以ControlNet为主/ControlNet is more important',
    value: 'ControlNet is more important'
  }
]

/**
 * 缩放模式
 */
export const resizeModeOptions = [
  {
    label: '拉伸/Just Resize',
    value: 'Just Resize'
  },
  {
    label: '裁剪/Crop and Resize',
    value: 'Crop and Resize'
  },
  {
    label: '填充/Resize and Fillced',
    value: 'Resize and Fillced'
  }
]

/**
 * 模型类型
 */
export const ModelTypeMap: { [key in number]: string } = {
  1: 'CHECKPOINT',
  2: 'LORA',
  3: 'EMBEDDING'
}

/**
 * 动画格式
 */
export const AnimationFormatOptions = [
  {
    label: 'GIF',
    value: 'GIF'
  },
  {
    label: 'MP4',
    value: 'MP4'
  },
  {
    label: 'PNG',
    value: 'PNG'
  },
  {
    label: 'WEBP',
    value: 'WEBP'
  },
  {
    label: 'WEBM',
    value: 'WEBM'
  }
]

/**
 * 闭环方式
 */
export const loopOptions = [
  {
    label: 'N',
    value: 'N'
  },
  {
    label: 'R-P',
    value: 'R-P'
  },
  {
    label: 'R+P',
    value: 'R+P'
  },
  {
    label: 'A',
    value: 'A'
  }
]
